<script type="text/javascript">
    var flashAPP = $('flashAPP');
    if (flashAPP) { 
        var size = flashAPP.getSize();
        window.commentsWidth = size.x * 0.6 - 45;
        window.okGroupWidth = size.x * 0.4;
    } else {
        window.commentsWidth = 568;
        window.okGroupWidth = 450;
    }
</script>
<div id="social">
    <div class="comments">
        <script type="text/javascript" src="//vk.com/js/api/openapi.js?105"></script>
        <script type="text/javascript">
          VK.init({apiId: 3323857, onlyWidgets: true});
        </script>
        <div id="vk_comments"></div>
        <script type="text/javascript">
        VK.Widgets.Comments("vk_comments", {limit: 5, width: window.commentsWidth, attach: "*"});
        </script>
    </div>
    <div class="widgets">
        <div id="ok_group_widget"></div>
        <script>
            $('ok_group_widget').getParent().setStyle('width', window.okGroupWidth);
            !function (d, id, did, st) {
                var js = d.createElement("script");
                js.src = "http://connect.ok.ru/connect.js";
                js.onload = js.onreadystatechange = function () {
                if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") {
                if (!this.executed) {
                    this.executed = true;
                    setTimeout(function () {
                        OK.CONNECT.insertGroupWidget(id,did,st);
                    }, 0);
                }
                }}
                d.documentElement.appendChild(js);
            }(document, "ok_group_widget", "<?=$this->groupID?>", "{width:" + window.okGroupWidth + ",height:285}");
        </script>
    </div>    
    <div class="clr"></div>
</div>